package riven.club;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * @author 陈浩
 * @date 2021-10-13 17:07
 */
/* JPA开启需要的配置 */
@EnableJpaAuditing
@EntityScan(basePackages = "riven.club.demo.entity")
@EnableJpaRepositories(basePackages = {"riven.club.demo.repository"}
//        ,
//        repositoryBaseClass = RepositoryImpl.class
)

@SpringBootApplication
public class JpaApplication implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication application = new SpringApplicationBuilder()
                .sources(JpaApplication.class)
                .build();
        application.run(args);
    }

    @Override
    public void run(String... args) {
        System.out.println("跑起来了，冲冲冲！！！");
    }
}
